package com.citywithincity.db.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.citywithincity.db.interfaces.IValueConvert;

/**
 * 转化
 * @author renxueliang
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface ColumnConvert {
	//中间类型（可能与实际一样）
	Class<?> target();
	//到entity的转化
	Class<? extends IValueConvert> toEntity() default IValueConvert.class;
	//到数据库的转化
	Class<? extends IValueConvert> toDb() default IValueConvert.class;
}
